//
// Pagination for tables
// --------------------------------------------------

.pagination {
    .clearfix; // Clear surrounding elements
    // List - pager
    .pagination-list {
        display: inline-block;
        padding-left: 0;
        padding-top: @base-unit * 0.25;
        padding-bottom: @base-unit * 0.25;
        .pull-left;

        > li {
            display: inline; // Remove list-style and block-level defaults
            > a,
            // Numbers
            > span {
                position: relative;
                float: left; // Collapse white-space
                padding: @pagination-padding-numbers;
                line-height: @pagination-line-height-numbers;
                text-decoration: none;
                background-color: @pagination-bg;
                margin-right: 1px;
                color: @pagination-text-color;
                z-index: @zindex-pagination;
            }
            // First item
            &:first-child {
                > a,
                > span {
                    margin-left: 0;
                    padding: @pagination-padding-first-last;
                    // Font icon height
                    height: @pagination-height-first-last;
                }

                i {
                    display: block;
                }
            }
            // Last item
            &:last-child {
                > a,
                > span {
                    margin-right: 0;
                    padding: @pagination-padding-first-last;
                    // Font icon height
                    height: @pagination-height-first-last;
                }

                i {
                    display: block;
                }
            }
        }
            // Non active item hover and focus
            > li > a,
            > li > span {
                &:hover,
                &:focus {
                    background-color: @pagination-hover-bg;
                }
            }
        // Active item hover and focus
        > .active > a,
        > .active > span {
            &,
            &:hover,
            &:focus {
                color: @pagination-active-color;
                background-color: @pagination-active-bg;
                border-color: @pagination-active-bg;
                cursor: default;
            }
        }
        // Disabled item hover and focus
        > .disabled {
            > span,
            > a,
            > a:hover,
            > a:focus {
                color: @pagination-disabled-color;
                background-color: @pagination-bg;
                border-color: @pagination-border;
                cursor: not-allowed;
            }
        }
    }
    // Pages
    .pagination-pages {
        margin: 0 @pagination-margin-horizontal;
        .pull-left;
        font-size: 0; // handles markup spaces
        label {
            font-size: @font-size-base;
        }
        // Dropdown version
        select {
            margin: 0 @base-unit * 0.5;
        }
        // Textbox version
        input[type="text"] {
            .input-width-15;
            .input-number;
            margin: 0 @base-unit * 0.5;
        }

        .pages-max {
            .text-semibold();
            font-size: @font-size-base;
        }
    }
    // Items per page
    .pagination-items-per-page {
        .pull-right;
        font-size: 0; // handles markup spaces
        label {
            font-size: @font-size-base;
        }

        select {
            margin-left: @base-unit * 0.5;
        }
    }
    // Form controls inside pagination - e.g. dropdown
    .form-control {
        width: auto;
        display: inline-block;
        margin-right: 0;
        vertical-align: baseline;
    }
}


.uniflat-pager {
    margin-bottom: @uniflat_pager-margin-bottom;
    padding: @uniflat_pager-padding;
}
